home *** CD-ROM | disk | FTP | other *** search
- #
- # Makefile for Tampa Network Operating System (TNOS)
- #
-
- ##############################################################################
- # #
- # The values in this Makefile SHOULD NOT need to be altered, and temptation #
- # to do so should be resisted. Doing so will make it easier to have major #
- # problems down the road as you upgrade to later versions. #
- # #
- # Instead, all local customizations should be placed in a separate file, #
- # named 'make.inc'. This file (if it exists) is included in the processing #
- # of this Makefile, and anything in that file can override settings in #
- # this file. #
- # #
- # Just say NO to editing the Makefile! If the author can resist the #
- # temptation, so can you ;-) #
- # #
- # There ARE notes throughout this Makefile as to things that you MAY wish #
- # to override in 'make.inc', so you are encouraged to look through here, and #
- # build your own 'make.inc' as needed. #
- # #
- ##############################################################################
-
-
- #######################
- # #
- # Version Variables #
- # #
- # DO NOT change these #
- # #
- #######################
-
- VERSION = 2
- RELEASE = 3
- LEVEL = 0
-
- # This defines whether this is a beta-test version or not. Make it blank
- # for release level compiles
- BETA = #-DBETA
-
- ifdef BETA
- # This is either 'a' for alpha, 'b' for beta, 'pl' for a interim patch
- # level, or ignored for release level compiles
- SUBTYPE = b
-
- # This will be ignored for release level compiles
- SUBLEVEL = 4
- endif
-
- VSTR = $(VERSION).$(RELEASE)$(LEVEL)$(SUBTYPE)$(SUBLEVEL)
- DVSTR = $(VERSION)$(RELEASE)$(LEVEL)
- VERS = $(BETA) -DVERSION=\"$(VSTR)\"
-
- ifeq ($(strip $(BETA)),)
- VERS := $(VERS) -DNDEBUG
- endif
-
-
- #######################
- # #
- # Compiler Variables #
- # #
- #######################
-
- #
- # Defines whether or not you are using GCC 2.6.x (or greater)
- # which support ELF *and* a.out - Redefine this in 'make.inc' to
- # 'USEELF = 1' if you have a system that compiles BOTH ELF and a.out.
- #
- # Use this for GCC 2.5.x or for 2.6.x a.out-only compiler setup, or
- # for an ELF-only setup
- #
- # This variable is ONLY used to help determine the flags for the CC variable
- # for systems that can compile both types of executable formats.
- #
- USEELF =
-
- #
- # Linking type - default is static linking - For dynamic linking, redefine
- # this in 'make.inc' as 'LTYPE ='
- #
- LTYPE = -static
-
-
- #######################
- # #
- # Commands/Parameters #
- # #
- #######################
-
- #
- # Executable command names
- #
- # These are processed BEFORE the inclusion of any 'make.inc' files, to allow
- # you to easily override them to your needs.
- #
- # NOTE: If you alter the USEELF variable, you *MAY* wish to
- # also change the definition for CC in your 'make.inc' file.
- #
- ifeq (USEELF,1)
- CC = gcc -b i486-linuxaout
- else
- CC = gcc
- endif
- RM = rm -f
- AR = ar rc
- MV = mv -f
- MKDIR = mkdir
- RANLIB = ranlib
- CHMOD = chmod
- FTPBASE = ~ftp/tnos
- DIRMODE = 777
- INSTALL = install -c
- CO = co
- CI = ci
- RCS = rcs
- COFLAGS = -q -M
- STRIP = true
- COFF2EXE = true
- TCL = tclsh
- C2MAN = c2man ${VERS} ${PATCHES} -DOPTIONAL="" -DUNIX -oman/man3 \
- -DNOSDIR=\"$(NOSDIR)\" ${ICURSES} ${ISQL} \
- "-MTNOS Development Manual"
- C2MAN_AUTO = ${C2MAN}
- POSTPROCESS = true
- CATALOGPADDING = 0
- JOBS = 1
-
-
- #######################
- # #
- # Supported Patches #
- # #
- #######################
-
- #
- # Supported patches are:
- #
- # -DUSE_SETSTACK Use the WAMPES setstack() tasking method
- # -DDUMP_CORE Don't try to recover cleanly after a system fault
- #
- PATCHES =
-
- #
- # Change this to 'SETSTACK= setsp.o' in 'make.inc' if you redefine PATCHES to
- # use -DUSE_SETSTACK. NOTE: PATCHES and SETSTACK **MUST** agree on
- # whether or not SETSTACK is being used.
- #
- SETSTACK=
-
-
-
- #######################
- # #
- # Curses Library #
- # #
- #######################
-
- #
- # Your curses library. Linux wants ncurses; System V wants curses; BSD wants
- # curses, termcap, and major work to substitute for missing features in BSD
- # curses. (Or install ncurses.)
- #
- # Slackware 1.1.0 and later use the convention of the ncurses headers with the
- # traditional names in /usr/include/ncurses; sources compiled for BSD curses
- # compile as is, for ncurses sources use -I/usr/include/ncurses and the source
- # need not be changed. This is a Good Thing. (If you're not using ncurses,
- # you don't need the ICURSES line.) If your ncurses isn't installed that way,
- # curses.h will be used.
- #
- # The default is now for the newer ncurses (or regular curses) where the
- # header file is /usr/include/curses.h and the library is libncurses (in the
- # normal library path.
- #
- # FreeBSD installs ncurses in /usr/include, so for that OS, you will want
- # to override these lines in 'make.inc'
- #
- ICURSES =
- LCURSES = -lncurses
-
-
- #######################
- # #
- # SQL Library #
- # #
- #######################
-
- #
- # Location of the needed SQL library, if you are using the SQL support.
- # If SQL is NOT defined for your compile, redefine the next two lines in
- # 'make.inc' as 'LSQL=' and 'ISQL='. If you ARE using SQL, then make sure
- # that the LSQL and ISQL lines point to the location of your SQL library,
- # and the directory with any needed include files for you SQL library.
- # If they do not, override these lines in 'make.inc'.
- #
- LSQL = -L/usr/local/Minerva/lib -lmsql
- ISQL = -I/usr/local/Minerva/include
-
-
- #######################
- # #
- # Warnings -- friends #
- # #
- #######################
-
- #
- # Warnings --- disable for less noise, enable for more certainty :-) gcc will
- # whine about things like partly bracketed initializers if you specify -W, but
- # this can be ignored unless you're trying to port JNOS to VMS....
- #
- # TNOS/Linux is much cleaner in this area, but there are some portability
- # warnings still (-Wtraditional) and some non-globally-prototyped functions.
- #
- WARNINGS = -W -Wall -Wpointer-arith -Wcast-align -Wtraditional \
- -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
- -Wnested-externs -Wcomment -Winline -Wid-clash-31 \
- -Wwrite-strings $(TOUGHWARNINGS) $(OPTIONAL) # -Wconversion
-
-
- TOUGHWARNINGS = -Wshadow # -Wredundant-decls -Werror
-
-
- #
- # If you are using a non-GCC compiler, or a GCC compiler prior to 2.7.0, you
- # will want to keep this next line as it is. You will probably get several
- # warnings about unused parameters to functions, but those are to be expected.
- # If you are using GCC 2.7.0 or later, override this line in 'make.inc' to
- # 'OPTIONAL = "-DOPTIONAL=__attribute__ ((unused))"'
- #
- OPTIONAL = "-DOPTIONAL="
-
-
- #######################
- # #
- # OPTIMIZATION #
- # #
- #######################
-
- #
- # This should normally be fine, but if you encounter unusual errors compiling,
- # and the code LOOKS good, try redefining this in 'make.inc' as 'OPTIMIZE='
- #
- OPTIMIZE = -O2 -Wuninitialized
-
-
-
- #######################
- # #
- # Debugging Variables #
- # #
- #######################
-
- #
- # The following definition can be used to compile in code to help profile
- # the performance of TNOS. I do NOT suggest it's use in real-world situations,
- # as it adds to the size of the executable, uses more memory, and slows down
- # the execution of the program. If you DO wish to use it, though, then
- # override it in 'make.inc' as 'PROFILE = -pg'
- #
- PROFILE =
-
-
- #
- # I strongly advise leaving the debugging information in, because this is NOT
- # production-quality code. -g1 instead of -g3 will make nos smaller, however,
- # and leaving off -g entirely will make it a LOT smaller.
- #
- # I *DO*, though, remove the debugging info from official distribution
- # executables, in the interest of keeping download sizes smaller.
- #
- # The DBGLIB could be overriden in 'make.inc' to 'DBGLIB=-lefence' to compile
- # using the publicly available memory debugging tool 'Electric Fence', or
- # for other debugging libraries. 'Electric Fence' is not required for TNOS.
- #
- DEBUG = $(PROFILE) -g3
- DBGLIB =
-
-
- #
- # This is for use in testing. Don't worry about it unless you want to be
- # able to build custom versions.
- #
- NOS = tnos
-
-
-
- ###############
- # #
- # Directories #
- # #
- ###############
-
- #
- # These define the root directory that you want TNOS installed into. You
- # *WILL* want to override these in 'make.inc', if you wish to install TNOS
- # anywhere else but '/nos'.
- #
- NOSDIR = /nos
- NOSDIRSTR = /nos
-
-
-
- #############################
- # #
- # User and System Overrides #
- # #
- #############################
-
-
- #
- # Include any files overridding any of these variables, if they exist
- #
- ifeq (make.inc,$(wildcard make.inc))
- include make.inc
- endif
- ifeq (make.inc-${OSTYPE},$(wildcard make.inc-${OSTYPE}))
- include make.inc-${OSTYPE}
- endif
-
-
-
- ####################################################
- # #
- # No user overridable variables beyond this point! #
- # #
- # Don't touch! This means you! #
- # #
- ####################################################
-
-
- CDEPFLAGS = $(LTYPE) -DUNIX $(ICURSES) $(ISQL)
- RCSFILELIST= *.[ch] *.dat *.in *.tcl *.chk *.hlp premake* makefile.* README* *make.inc* kbraw.s makeinc.dos makefile.all
-
-
-
- ############################
- # #
- # The primary targets used #
- # #
- ############################
-
-
- include makefile.all
-
- $(NOS): improper catalog.h $(REQUIRED)
- ${MAKE} -j $(JOBS) $(LIBS)
- echo --- Indexing All Archives
- $(RANLIB) $(LIBS)
- if [ -f $(NOS) ] ; \
- then \
- $(MV) $(NOS) $(NOS).bak; \
- fi
- echo --- Linking: $(NOS)
- $(CC) $(CFLAGS) -o $(NOS) $(REQUIRED) $(LIBS) $(LCURSES) $(DBGLIB) $(LSQL) $(SYSLIBS)
- -./mkvers $(NOSDIR)
- ${POSTPROCESS}
- # echo --- Removing unneeded RCS files
- # rcsclean $(RCSFILELIST)
-
-
- ##############################################
- # #
- # Definition for making certain header files #
- # #
- ##############################################
-
-
- hardware.h: unix.h
- cp unix.h hardware.h
-
- config.h: mkconfig.tcl config.in
- NOSDIR=${NOSDIR} $(TCL) mkconfig.tcl
-
- catalog.h: catalog.dat buildcat
- ./buildcat ${CATALOGPADDING}
-
- make.inc:
- ./build-make.inc
-
-
- ##########################
- # #
- # Administrative targets #
- # #
- ##########################
-
-
- zapVersion:
- echo --- Removing Version-specific object files
- -$(RM) mkvers version.o mailbox.o catalog.o register.o
-
- clean:
- $(RM) *.[oa] setsp.s $(MISCEXE) mkvers
-
- realclean: clean
- $(RM) config.h hardware.h .depend
- $(RM) $(NOS) $(NOS).bak
-
-
- depend dep: hardware.h config.h catalog.h
- echo --- Determining Dependencies
- $(CC) -MM $(CDEPFLAGS) $(PATCHES) *.c >.depend
-
- initial:
- test -d $(NOSDIR) || \
- $(MKDIR) $(NOSDIR) && \
- $(CHMOD) $(DIRMODE) $(NOSDIR)
- for d in etc spool public finger spool/mail spool/mqueue etc/help \
- spool/info spool/news spool/signatur spool/cmds ; do \
- test -d $(NOSDIR)/$$d || \
- $(MKDIR) $(NOSDIR)/$$d && \
- $(CHMOD) $(DIRMODE) $(NOSDIR)/$$d ; \
- done
-
- install:
- $(INSTALL) $(NOS) $(NOSDIR)
- $(INSTALL) ctlcheck $(NOSDIR)
- $(INSTALL) buildctl $(NOSDIR)
-
-
- touch:
- -touch config.h catalog.h
- -touch *.o
- -touch *.a
- -touch ctlcheck buildctl deldep mkvers
-
-
- tgz:
- -rm -f Tnos-$(VSTR)-src.tar.gz
- echo --- Adding source files to TAR.GZ file
- tar czf Tnos-$(VSTR)-src.tar.gz README *.[ch] premake* \
- makefile.[adu]* config.[chi]* catalog.dat *.in \
- *.tcl build-make.inc make.inc-* makeinc.dos kbraw.s
-
- zip:
- -rm -f Tnos-$(VSTR)-src.zip
- echo --- Adding source files to ZIP file
- zip -lkzq Tnos-$(VSTR)-src.zip README *.[ch] premake* \
- makefile.[adu]* config.[chi]* makeinc.dos\
- catalog.dat *.in mkconfig.tcl depend kbraw.s -x CONFIG.H \
- -x CATALOG.H -x TNOS.C -x HARDWARE.H <tnos.zipheader
- echo --- Adding DOS executable files to ZIP file
- zip -qk Tnos-$(VSTR)-src.zip tclsh.exe
-
- customkt:
- -rm -f customkt.zip
- echo --- Creating CUSTOMKT.ZIP
- zip -lkzq customkt.zip README.KIT config.in mkconfig.tcl <tnoskt.zipheader
- echo --- Adding DOS executable files to ZIP file
- zip -qk customkt.zip tclsh.exe
-
-
- patch:
- if [ ! -f patch.kit ] ; \
- then \
- touch patch.kit; \
- fi
- -diff -C 2 -P -w -X patch.kit old . >../Tnos-$(VSTR)-src-diff
-
- patch.gz: patch
- gzip ../Tnos-$(VSTR)-src-diff
-
- applypatch:
- -patch -p1 -s -l <patchkit*
- -rm patchkit*
-
- cleanpatch:
- -rm *.orig
-
- co:
- $(CO) $(COFLAGS) -l RCS/*.[ch],v RCS/*.in,v RCS/*.tcl,v \
- catalog.dat RCS/README* RCS/kbraw.s,v \
- RCS/makefile.[adu]*,v RCS/premake*,v RCS/make.inc-*,v \
- config.chk make.inc config.hlp build-make.inc makeinc.dos
- -touch config.h
-
- ci:
- $(CI) "-mInterim checkin $(VSTR)" $(RCSFILELIST)
-
- update:
- $(CI) -l "-mInterim checkin $(VSTR)" $(RCSFILELIST)
-
- rcsset:
- echo --- Setting all source files to Release$(VERSION)_$(RELEASE)$(LEVEL)$(SUBTYPE)$(SUBLEVEL)
- $(RCS) -q -nRelease$(VERSION)_$(RELEASE)$(LEVEL)$(SUBTYPE)$(SUBLEVEL): RCS/* >/dev/null
-
- rcsclean:
- rcsclean -u $(RCSFILELIST) Makefile
-
- rcsbase:
- $(CO) $(COFLAGS) config.h mkconfig.tcl config.in config.hlp
- -touch config.h
-
- unlock:
- rcs -u *.[ch] *.dat *.in *.tcl *.chk makefile* makeinc.dos
-
- makeman:
- echo --- Creating MAN pages from the C files
- for fname in `ls *.c | grep -v setsp | grep -v netdump | grep -v mboxcmd` ; do \
- ${C2MAN} $${fname}; \
- done
-
- makecat:
- echo --- Retrieving current MAN page from ftp site
- cp -f $(FTPBASE)/TDP/man/tnos.man man/man1/tnos.1
- echo --- Creating CAT pages from the MAN pages
- nroff -man man/man1/tnos.1 >man/cat1/tnos.1
- rm -f man/cat3/*
- ( cd man/man3; \
- for fname in `ls *` ; do \
- nroff -man $${fname} >../cat3/$${fname}; \
- done )
-
-
- manfiles: makeman makecat
-
- release: rcsset
- echo --- Obtaining Current MAIN.C file
- rm -f main.c main.o
- $(CO) $(COFLAGS) -lRelease$(VERSION)_$(RELEASE)$(LEVEL)$(SUBTYPE)$(SUBLEVEL) main.c
- $(MAKE) tgz
- $(MAKE) zip
-
- releasebase:
- echo --- Preparing CONFIG.CFG, NODE/VERSION.HLP for DOS base files archive
- cp -f config.cfg.dos /dos/nos.dos/etc/config.cfg
- unix2dos /nos/etc/help/version.hlp /dos/nos.dos/etc/help/version.hlp
- unix2dos /nos/etc/help/node.hlp /dos/nos.dos/etc/help/node.hlp
- echo --- Preparing FEATURES.NEW and NEW2TN$(VSTR) for DOS base files archive
- unix2dos features.new /dos/nos.dos/features.new
- unix2dos new2tn$(VSTR) /dos/nos.dos/doc/new2tn$(VSTR)
- echo --- Preparing SETUP.IN and MKSETUP.TCL for DOS base files archive
- unix2dos setup.in /dos/nos.dos/setup.in
- unix2dos mksetup.tcl /dos/nos.dos/mksetup.tcl
- echo --- Preparing DOS executable for DOS base files archive
- cp -f msdos/tnos.exe /dos/nos.dos/
- echo --- Creating DOS base files archive
- cd /dos/nos.dos ; \
- zip -krqz /home/src/tnos/base.zip * <info.$(VERSION)$(RELEASE)$(LEVEL)
- echo --- Preparing Linux executable for UNIX base files archive
- cp -f tnos /dos/nos.lnx/tnos
- strip /dos/nos.lnx/tnos
- echo --- Preparing CATALOG.CAT, CONFIG.CFG and NODE/VERSION.HLP for UNIX base files archive
- cp -f /nos/etc/catalog.cat /dos/nos.lnx/etc/catalog.cat
- cp -f /nos/etc/config.cfg /dos/nos.lnx/etc/config.cfg
- cp -f /nos/etc/help/version.hlp /dos/nos.lnx/etc/help/version.hlp
- cp -f /nos/etc/help/node.hlp /dos/nos.lnx/etc/help/node.hlp
- echo --- Preparing FEATURES.NEW and NEW2TN$(VSTR) for UNIX base files archive
- cp -f features.new /dos/nos.lnx/features.new
- cp -f new2tn$(VSTR) /dos/nos.lnx/doc/new2tn$(VSTR)
- echo --- Creating UNIX base files archive
- cd /dos/nos.lnx ; tar czf /home/src/tnos/base.tgz *
-
- releasedoc:
- echo --- Creating DOS doc files archive
- cd /dos/nos.dos/doc ; \
- zip -krq /home/src/tnos/doc.zip *
- echo --- Creating UNIX doc files archive
- cd /dos/nos.lnx/doc ; tar czf /home/src/tnos/doc.tgz *
-
- releaseman:
- #echo --- Creating DOS MAN archive
- # only the tnos.1 cat file, due to DOS 8.3 naming convention
- #zip -klq man.zip man/man1
- #zip -klrq man.zip man/cat1
- echo --- Creating UNIX MAN archive
- tar czf man.tgz man
-
- releasenotes:
- echo --- Copying current Release Notes for Release $(VSTR)
- cd $(FTPBASE)/TDP/ReleaseNotes; \
- mkdir Release$(VSTR); \
- chmod 755 Release$(VSTR); \
- cp Current/*.gif Release$(VSTR); \
- cp Current/*.sgml Release$(VSTR)/tn$(VERSION)_$(RELEASE)$(LEVEL).sgml; \
- chmod 644 Release$(VSTR)/*; \
- cd Release$(VSTR); ln -s tn$(VERSION)_$(RELEASE)$(LEVEL).html index.html
-
- zapDOS:
- echo --- Removing Version-specific object files from DOS directory
- -cd msdos; $(RM) mkvers version.o mailbox.o catalog.o register.o main.o
-
- releaseall: release zapVersion Version zapDOS tnos.ext releasebase makecat releaseman releasedoc
-
- installrelease:
- echo --- Creating new release directory at ftp site
- -rm -rf $(FTPBASE)/release$(VSTR)
- -mkdir $(FTPBASE)/release$(VSTR)
- -mkdir $(FTPBASE)/release$(VSTR)/unix
- -mkdir $(FTPBASE)/release$(VSTR)/dos
- cd $(FTPBASE); rm -f new; ln -s release$(VSTR) new; chmod 600 release$(VSTR)
- echo --- Installing source archives to ftp site
- mv Tnos-$(VSTR)-src.tar.gz $(FTPBASE)/new/unix/
- mv Tnos-$(VSTR)-src.zip $(FTPBASE)/new/dos/tnos$(DVSTR)s.zip
- echo --- Installing base archives to ftp site
- mv base.tgz $(FTPBASE)/new/unix/Tnos-$(VSTR).tar.gz
- mv base.zip $(FTPBASE)/new/dos/tnos$(DVSTR)b.zip
- echo --- Installing man archives to ftp site
- mv man.tgz $(FTPBASE)/new/unix/Tnos-$(VSTR)-man.tar.gz
- #mv man.zip $(FTPBASE)/new/dos/tnos$(DVSTR)m.zip
- echo --- Installing doc archives to ftp site
- mv doc.tgz $(FTPBASE)/new/unix/Tnos-$(VSTR)-doc.tar.gz
- mv doc.zip $(FTPBASE)/new/dos/tnos$(DVSTR)d.zip
- #echo --- Installing DOS customkit archive to ftp site
- #mv customkt.zip $(FTPBASE)/current/dos/
- echo --- Installing DOS executable to ftp site
- cp -f msdos/tnos.exe $(FTPBASE)/new/dos/
- chmod 444 $(FTPBASE)/new/dos/tnos.exe
- echo --- Fixing permissions on ZIP and GZ files installed
- chmod 444 $(FTPBASE)/new/dos/*.zip
- chmod 444 $(FTPBASE)/new/unix/*.gz
- echo --- Copying the features.new file to ftp site
- cp -f features.new $(FTPBASE)/new/unix/
- chmod 444 $(FTPBASE)/new/unix/features.new
- unix2dos features.new $(FTPBASE)/new/dos/features.new
- chmod 444 $(FTPBASE)/new/dos/features.new
- echo --- Copying the old README and tn-read.me files to ftp site
- cp -f $(FTPBASE)/current/unix/README $(FTPBASE)/new/unix
- cp -f $(FTPBASE)/current/unix/tn-read.me $(FTPBASE)/new/unix
- chmod 444 $(FTPBASE)/new/unix/README $(FTPBASE)/new/unix/tn-read.me
- cp -f $(FTPBASE)/current/dos/README $(FTPBASE)/new/dos
- cp -f $(FTPBASE)/current/dos/tn-read.me $(FTPBASE)/new/dos
- chmod 444 $(FTPBASE)/new/dos/README $(FTPBASE)/new/dos/tn-read.me
- echo "--- Copying the new2tn* files to the ftp site"
- cp -f $(FTPBASE)/current/unix/new2tn* $(FTPBASE)/new/unix/
- cp -f new2tn$(VSTR) $(FTPBASE)/new/unix/
- chmod 444 $(FTPBASE)/new/unix/new2tn*
- cp -f $(FTPBASE)/current/dos/new2tn* $(FTPBASE)/new/dos/
- unix2dos new2tn$(VSTR) $(FTPBASE)/new/dos/new2tn$(VSTR)
- chmod 444 $(FTPBASE)/new/dos/new2tn*
-
- echo --- Installing symlinks at ftp site
- cd $(FTPBASE)/new/unix; \
- ln -s ../../misc/cnvfwd; \
- ln -s ../../faq; ln -s ../../TDP; \
- ln -s TDP/tnosfwd/tnosfwd.txt; \
- ln -s TDP/tscript/tscript.txt tscript.doc
- cd $(FTPBASE)/new/dos; \
- ln -s ../../misc/cnvfwd.exe; \
- ln -s ../../faq; ln -s ../../TDP; \
- ln -s TDP/tnosfwd/tnosfwd.txt; \
- ln -s TDP/tscript/tscript.txt tscript.doc
-
- lintmisc:
- -flexelint +vm /etc/std.lnt nos -e14 -e15 -e515 -e532 -e533 \
- buildcat.c buildctl.c checkcat.c ctlcheck.c \
- deldep.c mkvers.c cnvfwd.c statconv.c >_lint.out
-
- linttnos:
- -flexelint +vm /etc/std.lnt nos linted >_lint.out1
-
- lint: linttnos lintmisc
-
-
- #######################################
- # #
- # Special cases for certain *.c files #
- # #
- #######################################
-
-
- setsp.o: setsp.c
- echo --- Compiling: $<
- $(CC) -E $< >setsp.s; cc -c setsp.s
-
-
- #
- # unix.o is special cased, because of a bug in GCC 4.6.x that improperly
- # optimizes, causing CPU time to DEVOUR all available.
- #
- unix.o: unix.c
- echo --- Compiling: $<
- $(CC) $(LTYPE) -DUNIX $(DEBUG) $(PATCHES) $(WARNINGS) $(ICURSES) $(VERS) -c unix.c -o unix.o
-
-
-
- #####################################################################
- # #
- # Special rules to build MSDOS executable using Unix cross-compiler #
- # #
- #####################################################################
-
-
- dos:
- test -d msdos || $(MKDIR) msdos
- echo --- Checking for required config.h file
- if [ ! -e config.dos ] ; then \
- echo ""; \
- echo "You must place a MSDOS config.h file in this directory"; \
- echo "named 'config.dos' to match the features you wish to"; \
- echo "compile for this MS-DOS compile"; \
- echo ""; \
- exit 1; \
- fi
- echo --- Creating any missing symlinks
- for f in `ls *.[chs]` config.chk catalog.dat makefile.all; do \
- if [ ! -e msdos/$$f ]; then \
- ln -s ../$$f msdos/$$f; \
- fi; \
- done; \
- cd msdos; \
- ln -s -f ../config.dos config.h; \
- ln -s -f ../makefile.dos Makefile; \
- ln -s -f ../nospc.h hardware.h; \
- ln -s -f ../makeinc.dos make.inc; \
- echo --- Making TNOS/DOS; \
- ${MAKE} "NOS=$(NOS)" -i all
- echo --- MSDOS executables completed - located in the \"msdos\" directory
-
-
- $(NOS).exe: dos
- cd msdos; make "NOS=$(NOS)" $(NOS).exe
-
- doslint:
- -cd msdos;flexelint +vm /etc/std.lnt ../go32 ../linted >_lint.out
-
-
-
- ##################
- # #
- # Explicit rules #
- # #
- ##################
-
-
- .c.o:
- echo --- Compiling: $<
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
- ${C2MAN_AUTO} $<
-
- #
- # and include a dependency file if one exists, which it SHOULD
- #
- ifeq (.depend,$(wildcard .depend))
- include .depend
- endif
-
-
- .SILENT:
-
-
- .PHONY: man makeman makecat improper
-
-
- #
- # finally, allow the user to define additional targets.
- # this is done at the end, rather than in make.inc, to avoid
- # having the default target of 'all' changed.
- #
- ifeq (make.end,$(wildcard make.end))
- include make.end
- endif
-
-